package com.rbn.stockmobiledevices.estadisticas;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonProperty;

@Entity
@Table(name = "ganancias")
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE)
public class Ganancia implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "agno")
	private int agno;
	
	@Id
	@Column(name = "mes")
	private int mes;
	
	@Column(name = "cantidad")
	private int cantidad;
	
	@Column(name = "compra")
	private double compra;
	
	@Column(name="venta")
	private double venta;
	
	@Column(name = "ganancia")
	private double ganancia;
	
	public Ganancia(){
		super();
	}
	
	public Ganancia(int agno, int mes, int cantidad, double compra, double venta, double ganancia) {
		super();
		this.agno = agno;
		this.mes = mes;
		this.cantidad = cantidad;
		this.compra = compra;
		this.venta = venta;
		this.ganancia = ganancia;
	}
	
	@JsonProperty
	public int getAgno() {
		return agno;
	}
	public void setAgno(int agno) {
		this.agno = agno;
	}
	
	@JsonProperty
	public int getMes() {
		return mes;
	}
	public void setMes(int mes) {
		this.mes = mes;
	}
	
	@JsonProperty
	public double getCantidad() {
		return cantidad;
	}
	public void setCantidad(int cantidad) {
		this.cantidad = cantidad;
	}
	
	@JsonProperty
	public double getCompra() {
		return compra;
	}
	public void setCompra(double compra) {
		this.compra = compra;
	}
	
	@JsonProperty
	public double getVenta() {
		return venta;
	}
	public void setVenta(double venta) {
		this.venta = venta;
	}
	
	@JsonProperty
	public double getGanancia() {
		return ganancia;
	}
	public void setGanancia(double ganancia) {
		this.ganancia = ganancia;
	}
}
